{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load django_bootstrap5 %}
{% load ietf_filters %}
{% block title %}Last call text for {{ doc }}{% endblock %}
{% block content %}
    {% origin %}
    <h1 class="mb-3">
        Last call text
        <br>
        <small class="text-body-secondary">{{ doc }}</small>
    </h1>
    <form method="post">
        {% csrf_token %}
        {% bootstrap_form last_call_form %}
        {% if can_request_last_call and need_intended_status %}
            <div class="form-text">
                You need to select intended status of {{ need_intended_status }} and regenerate last call text to request last call.
            </div>
        {% endif %}
        <button type="submit" class="btn btn-primary" name="save_last_call_text">Save text</button>
        {% if can_request_last_call and not need_intended_status %}
            <button type="submit"
                    class="btn btn-primary"
                    name="send_last_call_request"
                    value="Save and Request Last Call">
                Save text &amp; request last call
            </button>
        {% endif %}
        <button type="submit"
                class="btn btn-warning"
                name="regenerate_last_call_text"
                value="Regenerate Last Call Text">
            Regenerate text
        </button>
        {% if user|has_role:"Secretariat" and can_make_last_call %}
            <a class="btn btn-primary"
               href="{% url 'ietf.doc.views_ballot.make_last_call' name=doc.name %}">Issue last call</a>
        {% endif %}
        <a class="btn btn-secondary float-end"
           href="{% url "ietf.doc.views_doc.document_main" name=doc.name %}">
            Back
        </a>
    </form>
{% endblock %}